package cn.iocoder.yudao.module.erp.controller.admin.recycle.vo.order;

import cn.iocoder.yudao.module.erp.controller.admin.recycle.vo.item.ErpRecycleOrderItemBaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * ERP 回收订单 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class ErpRecycleOrderBaseVO {

    @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "客户编号不能为空")
    private Long customerId;

    @Schema(description = "回收日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "回收日期不能为空")
    private LocalDateTime recycleTime;

    @Schema(description = "回收总重量，单位：克", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "回收总重量不能为空")
    private BigDecimal totalWeight;

    @Schema(description = "回收总金额，单位：元", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "回收总金额不能为空")
    private BigDecimal totalPrice;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "附件地址")
    private String fileUrl;

    @Schema(description = "回收订单项列表", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "回收订单项列表不能为空")
    @Valid
    private List<ErpRecycleOrderItemBaseVO> items;

} 